permutations of a string solution

welcome to shbcf.ru